<template>
  <view class="flex-row-center">
    <view class="width80">
      <uni-search-bar v-model="queryValue" placeholder="请输入" clearButton="auto" cancelButton="none" bgColor="#fff" @clear="handleClear"></uni-search-bar>
    </view>
    <view class="width20">
      <button class="red-btn" size="mini" @click="searchQuery">搜索</button>
    </view>
  </view>
</template>

<script setup>
import { ref } from 'vue';

  const queryValue = ref()
  const handleClear = ()=>{ 
    emit('search',queryValue.value)
  }
  const emit = defineEmits(['submit','update'])
  const searchQuery = ()=>{
    emit('search',queryValue.value)
  }
  
</script>

<style lang="scss">

</style>